<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2>爱心抽奖</h2>
        <ol class="breadcrumb">
            <li>
                <a href="#">首页</a>
            </li>

            <li class="active">
                <strong>爱心抽奖</strong>
            </li>
        </ol>
    </div>

</div>

<div class="wrapper wrapper-content animated fadeInRight ecommerce">

    <div class="ibox-content m-b-sm border-bottom" id="form1">
        <div class="row">
            <div class="col-sm-3">
                <div class="form-group">
                    <label class="control-label" for="level">等级</label>
                    <input type="text" id="level" name="level" placeholder="等级"
                           class="form-control">
                </div>
            </div>
            <div class="col-sm-3">
                <div class="form-group">
                    <label class="control-label" for="prize">奖品</label>
                    <input type="text" id="prize" name="prize" placeholder="奖品"
                           class="form-control">
                </div>
            </div>


        </div>
        <div class="row">
            <div class="col-sm-6">
                <a class="btn btn-success btn-outline" href="#{:U('form')}">
                    <i class="fa fa-edit"></i>
                    <span class="bold">添加</span>
                </a>
            </div>
            <div class="col-sm-6 text-right">
                <button class="btn btn-default" data-op="reset">
                    <i class="fa fa-refresh"></i>
                    <span class="bold">重置</span>
                </button>
                &nbsp;
                &nbsp;
                <button class="btn btn-primary" data-op="search">
                    <i class="fa fa-search"></i>
                    <span class="bold">查询</span>
                </button>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-content">
                    <table class="footable table table-stripped toggle-arrow-tiny" id="footable">
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(document).ready(function () {
        YFootTable.create('#footable', {
            baseUrl: "{:U('Luck/')}",
            searchForm: '#form1',
            order:'asc',
            columns: [
                {name: 'level', title: '等级', sortable: true}
                , {name: 'prize', title: '奖品', sortable: true, breakpoints: 'xs sm md'}
                , {name: 'rate', title: '中奖概率', sortable: true, breakpoints: 'xs sm md'}
                , {name: 'note', title: '备注', sortable: true, breakpoints: 'xs sm md'}
                , {name: 'prize_img', title: '奖品图片',formatter:'image100x100', sortable: true, breakpoints: 'xs sm md'}
            ],
            actions: ['view', 'edit', 'remove']
        });
    });
</script>